1. Field of the Invention
The present invention relates to an information processing apparatus, a control method of an information processing apparatus, and a storage medium.
2. Description of the Related Art
Methods of measuring the shape of an object include a pattern projection technique, for example. This method involves projecting a plurality of patterns onto a target object while switching between the patterns, measuring distance information by analyzing images captured of light reflected thereby, and acquiring the shape of the object. In order to perform high-speed imaging for each pattern at this time, the timing at which the projection patterns are switched, and the imaging timing need to be accurately synchronized.
Japanese Patent No. 04391137 discusses a method that involves storing patterns in memory, in advance, in the order in which they will be projected, and projecting the stored patterns onto the target object continuously during measurement.
On the other hand, as for a control apparatus for switching and generating projection patterns, improvement in development efficiency can be anticipated by using a PC loaded with an operating system (OS) such as Windows (registered trademark), which has a substantial application development environment and is easy to install.
However, since an OS, such as Windows, is a non-real time OS, processing for creating and switching projection patterns may not be performed on a timely enough basis, and the same pattern may be output continuously, in which case, imaging data will be duplicated.
This duplication of imaging data will be described, with reference to FIG. 15. In the example in FIG. 15, four types of projection patterns 1 to 4 are generated on the system side, and these patterns are controlled so as to be respectively switched, projected, and imaged, one frame at a time. However, since pattern 3 was not generated within one frame, pattern 2 is in fact projected continuously in two frames, resulting in pattern 2 being redundantly acquired as imaging data. Also, since the frequency, with which duplication occurs and the number of frames in which duplicate patterns are continually projected, are irregular, processing for eliminating duplication by identifying identical patterns within imaging data on the system side is needed, increasing the load during image analysis.
With the method disclosed in Japanese Patent No. 04391137, sufficient memory for storing several projection patterns needs to be installed. Also, the memory needs to be rewritten in order to change the patterns, and hardware needs to be changed in order to add patterns. Also, in Japanese Patent No. 04391137, a method of generating a pattern each time is also disclosed, but imaging data could possibly be duplicated in a case when high-speed processing that requires that patterns be switched in units of one frame is performed.